package org.jeecg.modules.extbpm.process.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.extbpm.process.entity.ExtActProcessForm;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 流程业务关联表
 * @author： jeecg-boot
 * @date：   2019-03-15
 * @version： V1.0
 */
public interface ExtActProcessFormMapper extends BaseMapper<ExtActProcessForm> {
	
	@Select("SELECT DISTINCT t.FORM_TYPE FROM EXT_ACT_PROCESS_FORM t WHERE t.PROCESS_ID = #{processId}")
	public List<String> queryFormTypeByProcessid(@Param("processId") String processId);
	
	@Select("SELECT cf.DB_FIELD_NAME,cf.DB_FIELD_TXT FROM ONL_CGFORM_FIELD cf INNER JOIN ONL_CGFORM_HEAD ch ON cf.CGFORM_HEAD_ID = ch.ID WHERE ch.TABLE_NAME = #{tableName} ORDER BY cf.ORDER_NUM ")
	public List<Map<String,String>> queryFieldByOnlineCode(@Param("tableName") String tableName);

}
